<template>
  <div>
    <h1>About</h1>
    <router-link to="/">Home</router-link>
    <!-- a 标签 刷新导航 走服务端渲染-->
    <h1>a 标签</h1>
    <a href="/">首页</a>

    <!-- router-link 导航链接组件 -->
    <h1>router-link</h1>
    <router-link to="/">首页</router-link>

    <!-- 编程式导航 -->
    <h1>编程式导航</h1>
    <button @click="go">首页</button>
  </div>
</template>

<script>
export default {
  name: 'About',
  methods: {
    go () {
      this.$router.push('/')
    }
  }
}
</script>

<style>

</style>